import Article from '@/views/article/index.vue'
import Login from '@/views/login/index.vue'
import Layout from '@/views/publish/Layout.vue'
import Home from '@/views/home/index.vue'
import Publish from '@/views/publish/index.vue'
import { createRouter, createWebHistory } from 'vue-router'
const router = createRouter({
    history: createWebHistory(),
    routes: [
        { path: '/login', component: Login },
        {
            path: '/', component: Layout,
            children: [
                { path: '', component: Home },
                { path: 'article', component: Article },
                { path: 'publish/:id?',component:Publish}
            ]
        }
    ]
})
export default router